﻿using System;
using System.Diagnostics;

namespace Codeflows
{
    public static class ProfilingHelpers
    {
        public static void ProfileAction(Action action, string name)
        {
            var sw = Stopwatch.StartNew();
            action();
            sw.Stop();
            Console.WriteLine("Action {0} took: {1}ms", name, sw.ElapsedMilliseconds);
        }
    }
}